<template>
  <el-tabs
    v-model="selectTab"
    type="border-card"
  >
      <el-tab-pane v-if="培训进修"  label="培训进修" name="培训进修"> <peixun/></el-tab-pane>
      <el-tab-pane v-if="挂职锻炼"  label="挂职锻炼(顶岗实践)" name="挂职锻炼"> <guazhi/></el-tab-pane>
      <el-tab-pane v-if="社会兼职"  label="社会兼职" name="社会兼职"> <shehui/></el-tab-pane>
      <el-tab-pane v-if="项目获奖" label="项目获奖(包括行政奖励)" name="项目获奖"> <huojiang/></el-tab-pane>
      <el-tab-pane v-if="技术专利"  label="技术专利(技术发明)" name="技术专利"> <jishu/></el-tab-pane>
      <el-tab-pane v-if="在研课题"  label="在研课题" name="在研课题"> <zaiyan/></el-tab-pane>
      <el-tab-pane v-if="著作论文"  label="著作论文" name="著作论文"> <lunwen/></el-tab-pane>
    </el-tabs>

 
 
</template>

<script>

import peixun from './培训进修'
import guazhi from './挂职锻炼'
import zaiyan from './在研课题'
import shehui from './社会兼职'
import lunwen from './著作论文'
import huojiang from './项目获奖'
import jishu from './技术专利'

export default {
  components:{
    peixun,
    guazhi,
    zaiyan,
    shehui,
    lunwen,
    huojiang,
    jishu,
  
   
  },
  data () {
    return {
selectTab:'',
     培训进修:false,
      挂职锻炼:false,  
     社会兼职:false,
     项目获奖:false,
      技术专利:false,
      在研课题:false,  
     著作论文:false,
      培训进修:false,
    }
  },created(){
    this.isInput = this.$route.query.mode == "input";
    if(this.isInput)
    {
      this.挂职锻炼 = this.$root.user.ROLE_INPUT.indexOf("6.3.1 挂职锻炼") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.技术专利 = this.$root.user.ROLE_INPUT.indexOf("6.3.2 技术专利") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.培训进修 = this.$root.user.ROLE_INPUT.indexOf("6.3.3 培训进修") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.社会兼职 = this.$root.user.ROLE_INPUT.indexOf("6.3.4 社会兼职") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.项目获奖 = this.$root.user.ROLE_INPUT.indexOf("6.3.5 项目获奖") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.在研课题 = this.$root.user.ROLE_INPUT.indexOf("6.3.6 在研课题") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      this.著作论文 = this.$root.user.ROLE_INPUT.indexOf("6.3.7 著作论文") !== -1 || this.$root.user.ROLE_INPUT == "admin";;
      if(this.挂职锻炼){
        this.selectTab = "挂职锻炼"
        return;
      }
       if(this.技术专利){
        this.selectTab = "技术专利"
        return;
      }
       if(this.培训进修){
        this.selectTab = "培训进修"
        return;
      }
       if(this.社会兼职){
        this.selectTab = "社会兼职"
        return;
      }
       if(this.项目获奖){
        this.selectTab = "项目获奖"
        return;
      }
        if(this.在研课题){
        this.selectTab = "在研课题"
        return;
      }
        if(this.著作论文){
        this.selectTab = "著作论文"
        return;
      }
    }
    this.isAudit = this.$route.query.mode == "audit";
    if(this.isAudit){
       this.挂职锻炼 = this.$root.user.ROLE_AUDIT.indexOf("6.3.1 挂职锻炼") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.技术专利 = this.$root.user.ROLE_AUDIT.indexOf("6.3.2 技术专利") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.培训进修 = this.$root.user.ROLE_AUDIT.indexOf("6.3.3 培训进修") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.社会兼职 = this.$root.user.ROLE_AUDIT.indexOf("6.3.4 社会兼职") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.项目获奖 = this.$root.user.ROLE_AUDIT.indexOf("6.3.5 项目获奖") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.在研课题 = this.$root.user.ROLE_AUDIT.indexOf("6.3.6 在研课题") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
      this.著作论文 = this.$root.user.ROLE_AUDIT.indexOf("6.3.7 著作论文") !== -1 || this.$root.user.ROLE_AUDIT == "admin";;
     if(this.挂职锻炼){
        this.selectTab = "挂职锻炼"
        return;
      }
       if(this.技术专利){
        this.selectTab = "技术专利"
        return;
      }
       if(this.培训进修){
        this.selectTab = "培训进修"
        return;
      }
       if(this.社会兼职){
        this.selectTab = "社会兼职"
        return;
      }
       if(this.项目获奖){
        this.selectTab = "项目获奖"
        return;
      }
        if(this.在研课题){
        this.selectTab = "在研课题"
        return;
      }
        if(this.著作论文){
        this.selectTab = "著作论文"
        return;
      }
   }

    

  }
}
</script>
